package com.success.application.base;

import android.support.v7.widget.RecyclerView;
import android.view.View;

import butterknife.ButterKnife;

/**
 * Created by ChrisWong on 2017/1/17.
 */

public abstract class BaseHolder<T> extends RecyclerView.ViewHolder
        implements View.OnClickListener,View.OnLongClickListener {

    public BaseHolder(View itemView) {
        super(itemView);
        ButterKnife.bind(this, itemView);
        itemView.setOnClickListener(this);
        itemView.setOnLongClickListener(this);
    }

    protected abstract void bindItem(T t);

    @Override
    public void onClick(View v){

    }

    @Override
    public boolean onLongClick(View v){
        return false;
    }
}
